Skip to content

module: only emit require(esm) warning under --trace-require-module#56194

Closed
joyeecheung wants to merge 2 commits intonodejs:mainfrom
joyeecheung:trace-require-module
Closed

module: only emit require(esm) warning under --trace-require-module#56194
joyeecheung wants to merge 2 commits intonodejs:mainfrom
joyeecheung:trace-require-module

Conversation

@joyeecheung
Copy link
Copy Markdown
Member

require(esm) is relatively stable now and the experimental warning has run its course - it's now more troublesome than useful. This patch changes it to no longer emit a warning unless --trace-require-module is explicitly used. The flag supports two modes:

  • --trace-require-module=all: emit warnings for all usages
  • --trace-require-module=no-node-modules: emit warnings for usages that do not come from a node_modules folder.

Fixes: #55417
Refs: #55085 (comment)

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. backport-open-v20.x Indicate that the PR has an open backport c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. module Issues and PRs related to the module subsystem. needs-ci PRs that need a full CI run. notable-change PRs with changes that should be highlighted in changelogs. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can we supress the new experimental warning from the new default require(esm) setting?

9 participants